<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class LogoutCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:logout {serialNumber}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Execute the console command.
     */
    public function handle(): void
    {
        $id = (int)$this->argument('serialNumber');
        if ($id === 0) return;
        forgetCache($id);
    }
}
